import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../base/Constant.dart';
import 'BalanceListPage.dart';
import 'MoneyListPage.dart';
import 'CardListPage.dart';

class FundPage extends StatefulWidget {
  FundPage({Key key}) : super(key: key);

  @override
  _FundPageState createState() => _FundPageState();
}

class _FundPageState extends State<FundPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
          title: Text(
            '我的资金',
            style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(BIG_FONT_SIZE)),
          ),
          elevation: 1.0,
          backgroundColor: mainColor,
      ),
      body: Container(
        child: Column(
          children: <Widget>[
            Expanded(
                child: new SingleChildScrollView(
                  scrollDirection: Axis.vertical,
                  physics: BouncingScrollPhysics(),
                  child: new Column(
                    children: <Widget>[
                      Container(
                        padding: EdgeInsets.all(
                            ScreenUtil.getInstance().setHeight(DP_20)),
                        margin: EdgeInsets.fromLTRB(
                            0, ScreenUtil.getInstance().setHeight(DP_20), 0, 0),
                        color: Colors.white,
                        child: new GestureDetector(
                          onTap: () {
                            Navigator.of(context)
                                .push(new MaterialPageRoute(builder: (context) {
                              return new CardListPage();
                            }));
                          },
                          child: new Row(
                            children: <Widget>[
                              Image.asset(
                                "images/icon_menu_a.png",
                                scale: 1.15,
                                width:
                                    ScreenUtil.getInstance().setHeight(DP_50),
                                height:
                                    ScreenUtil.getInstance().setHeight(DP_50),
                              ),
                              Text('  '),
                              Expanded(
                                child: Text(
                                  '银行卡管理',
                                  style: TextStyle(
                                      fontSize: ScreenUtil.getInstance()
                                          .setSp(NORMAL_FONT_SIZE),
                                      color: Colors.black87),
                                ),
                              ),
                              Icon(
                                Icons.arrow_forward_ios,
                                color: Colors.black87,
                                size: 20,
                              )
                            ],
                          ),
                        ),
                      ),
                      Container(
                        padding: EdgeInsets.all(
                            ScreenUtil.getInstance().setHeight(DP_20)),
                        margin: EdgeInsets.fromLTRB(
                            0, ScreenUtil.getInstance().setHeight(DP_20), 0, 0),
                        color: Colors.white,
                        child: new GestureDetector(
                          onTap: () {
                            Navigator.of(context)
                                .push(new MaterialPageRoute(builder: (context) {
                              return new BalanceListPage();
                            }));
                          },
                          child: new Row(
                            children: <Widget>[
                              Image.asset(
                                "images/icon_menu_a.png",
                                scale: 1.15,
                                width:
                                    ScreenUtil.getInstance().setHeight(DP_50),
                                height:
                                    ScreenUtil.getInstance().setHeight(DP_50),
                              ),
                              Text('  '),
                              Expanded(
                                child: Text(
                                  '余额变动',
                                  style: TextStyle(
                                      fontSize: ScreenUtil.getInstance()
                                          .setSp(NORMAL_FONT_SIZE),
                                      color: Colors.black87),
                                ),
                              ),
                              Icon(
                                Icons.arrow_forward_ios,
                                color: Colors.black87,
                                size: 20,
                              )
                            ],
                          ),
                        ),
                      ),
                      Container(
                        padding: EdgeInsets.all(
                            ScreenUtil.getInstance().setHeight(DP_20)),
                        margin: EdgeInsets.fromLTRB(
                            0, ScreenUtil.getInstance().setHeight(DP_20), 0, 0),
                        color: Colors.white,
                        child: new GestureDetector(
                          onTap: () {
                            Navigator.of(context)
                                .push(new MaterialPageRoute(builder: (context) {
                              return new MoneyListPage();
                            }));
                          },
                          child: new Row(
                            children: <Widget>[
                              Image.asset(
                                "images/icon_menu_a.png",
                                scale: 1.15,
                                width:
                                    ScreenUtil.getInstance().setHeight(DP_50),
                                height:
                                    ScreenUtil.getInstance().setHeight(DP_50),
                              ),
                              Text('  '),
                              Expanded(
                                child: Text(
                                  '提现记录',
                                  style: TextStyle(
                                      fontSize: ScreenUtil.getInstance()
                                          .setSp(NORMAL_FONT_SIZE),
                                      color: Colors.black87),
                                ),
                              ),
                              Icon(
                                Icons.arrow_forward_ios,
                                color: Colors.black87,
                                size: 20,
                              )
                            ],
                          ),
                        ),
                      ),
                    ]
                  )
                )
            )
          ],
        ),
      ),
    );
  }
}